<?php
	require_once(realpath(dirname(__FILE__)) . "/Baseobj.class.php");

	class Variable extends Baseobj{

		var $id;
		var $nom;
		var $valeur;
	 	var $protege;
	 	var $cache;

		const TABLE="variable";
		var $table=self::TABLE;

		var $bddvars=array("id", "nom", "valeur", "protege", "cache");

		function __construct($nom = ""){
			
			parent::__construct();

			if($nom != "")
				$this->charger($nom);				
		}


		function charger($nom){
			return $this->getVars("select * from $this->table where nom=\"$nom\"");
		}

		function charger_id($id){
			return $this->getVars("select * from $this->table where id=\"$id\"");
		}
	}
?>